(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 11.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[     39280,       1027]
NotebookOptionsPosition[     37953,        978]
NotebookOutlinePosition[     38330,        994]
CellTagsIndexPosition[     38287,        991]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Monte Carlo Simulations ", "Title",
 CellChangeTimes->{{3.681602706810686*^9, 3.6816027127728815`*^9}, {
  3.687551140968678*^9, 3.687551156033121*^9}, {3.6978957608460107`*^9, 
  3.6978958455129538`*^9}, {3.697896106990513*^9, 3.69789612556186*^9}}],

Cell["\<\
Natural Amenities, Neighborhood Dynamics, and Persistence in the Spatial \
Distribution of Income by Sanghoon Lee and Jeffrey Lin\
\>", "Subtitle",
 CellChangeTimes->{{3.6978961269946547`*^9, 3.697896149181421*^9}}],

Cell[CellGroupData[{

Cell["Functions to Generate Data", "Section",
 CellChangeTimes->{{3.6978958246566243`*^9, 3.697895827752474*^9}, {
  3.6978958895367546`*^9, 3.6978959235740595`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"nextR", "[", 
    RowBox[{"prevR_", ",", "ia_", ",", "re_", ",", "numNeighborhoods_", ",", 
     RowBox[{"{", 
      RowBox[{"beta0_", ",", "beta1_", ",", "beta2_", ",", "sdShock_"}], 
      "}"}]}], "]"}], ":=", 
   RowBox[{"Module", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"ones", ",", " ", "shocks"}], "}"}], ",", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"ones", "=", 
       RowBox[{"ConstantArray", "[", 
        RowBox[{"1", ",", "numNeighborhoods"}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"shocks", "=", 
       RowBox[{"RandomReal", "[", 
        RowBox[{
         RowBox[{"NormalDistribution", "[", 
          RowBox[{"0", ",", "sdShock"}], "]"}], ",", 
         RowBox[{"{", 
          RowBox[{"1", ",", "numNeighborhoods"}], "}"}]}], "]"}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{"Flatten", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"{", 
          RowBox[{"{", 
           RowBox[{"beta0", ",", " ", "beta1", ",", 
            RowBox[{"(", 
             RowBox[{"1", "+", " ", "beta2"}], ")"}]}], "}"}], "}"}], ".", 
         RowBox[{"{", 
          RowBox[{"ones", ",", "ia", ",", "prevR"}], "}"}]}], "+", 
        RowBox[{"{", "re", "}"}], "+", "shocks"}], "]"}]}]}], "]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.6816723295867977`*^9, 3.681672334600277*^9}, {
   3.6816723779162817`*^9, 3.6816723786806707`*^9}, {3.6816724327093563`*^9, 
   3.681672453549337*^9}, {3.681672499100934*^9, 3.6816725500906687`*^9}, {
   3.685216847806748*^9, 3.685216850482276*^9}, 3.685216911140275*^9, {
   3.685217171268148*^9, 3.6852171921035137`*^9}, {3.6852173351243973`*^9, 
   3.685217336515011*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"genData", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "numNeighborhoods_", ",", " ", "numPeriods_", ",", "numPeriodsUsed_"}], 
     "}"}], ",", 
    RowBox[{"{", " ", 
     RowBox[{"probNf_", ",", " ", "probIaNf_", ",", "reSD_"}], "}"}], ",", 
    " ", 
    RowBox[{"{", 
     RowBox[{"beta0_", ",", "beta1_", ",", "beta2_", ",", "sdShock_"}], "}"}],
     ",", "thresR_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "nf", ",", "ia", ",", "re", ",", "initR", ",", "ones", ",", "shocks", 
      ",", "rHistory", ",", "dRHistory", ",", "oneColumn"}], "}"}], ",", 
    RowBox[{
     RowBox[{"nf", " ", "=", " ", 
      RowBox[{"RandomInteger", "[", 
       RowBox[{
        RowBox[{"BernoulliDistribution", "[", "probNf", "]"}], ",", 
        "numNeighborhoods"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"ia", "=", 
      RowBox[{"nf", "*", 
       RowBox[{"RandomInteger", "[", 
        RowBox[{
         RowBox[{"BernoulliDistribution", "[", "probIaNf", "]"}], ",", 
         "numNeighborhoods"}], "]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"re", "=", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"reSD", "==", "0"}], ",", 
        RowBox[{"ConstantArray", "[", 
         RowBox[{"0", ",", "numNeighborhoods"}], "]"}], ",", 
        RowBox[{"RandomReal", "[", 
         RowBox[{
          RowBox[{"NormalDistribution", "[", 
           RowBox[{"0", ",", "reSD"}], "]"}], ",", "numNeighborhoods"}], 
         "]"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"initR", "=", 
      RowBox[{"RandomReal", "[", 
       RowBox[{
        RowBox[{"UniformDistribution", "[", 
         RowBox[{"{", 
          RowBox[{"0", ",", "1"}], "}"}], "]"}], ",", "numNeighborhoods"}], 
       "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"rHistory", "=", 
      RowBox[{"NestList", "[", 
       RowBox[{
        RowBox[{
         RowBox[{"nextR", "[", 
          RowBox[{"#", ",", "ia", ",", "re", ",", "numNeighborhoods", ",", 
           RowBox[{"{", 
            RowBox[{"beta0", ",", "beta1", ",", "beta2", ",", "sdShock"}], 
            "}"}]}], "]"}], "&"}], ",", "initR", ",", "numPeriods"}], "]"}]}],
      ";", "\[IndentingNewLine]", 
     RowBox[{"dRHistory", "=", 
      RowBox[{
       RowBox[{"rHistory", "[", 
        RowBox[{"[", 
         RowBox[{
          RowBox[{"2", ";;", 
           RowBox[{"-", "1"}]}], ",", "All"}], "]"}], "]"}], "-", 
       RowBox[{"rHistory", "[", 
        RowBox[{"[", 
         RowBox[{
          RowBox[{"1", ";;", 
           RowBox[{"-", "2"}]}], ",", "All"}], "]"}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"oneColumn", "=", 
      RowBox[{"ConstantArray", "[", 
       RowBox[{"1.", ",", 
        RowBox[{"{", 
         RowBox[{"numPeriods", ",", "1"}], "}"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"Transpose", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Flatten", "[", 
         RowBox[{"Transpose", "[", 
          RowBox[{"#", "[", 
           RowBox[{"[", 
            RowBox[{
             RowBox[{"-", "numPeriodsUsed"}], ";;", 
             RowBox[{"-", "1"}]}], "]"}], "]"}], "]"}], "]"}], "&"}], "/@", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"oneColumn", ".", 
          RowBox[{"{", 
           RowBox[{"Range", "[", "numNeighborhoods", "]"}], "}"}]}], ",", 
         RowBox[{"Transpose", "[", 
          RowBox[{
           RowBox[{"ConstantArray", "[", 
            RowBox[{"1.", ",", 
             RowBox[{"{", 
              RowBox[{"numNeighborhoods", ",", "1"}], "}"}]}], "]"}], ".", 
           RowBox[{"{", 
            RowBox[{"Range", "[", "numPeriods", "]"}], "}"}]}], "]"}], ",", 
         RowBox[{"oneColumn", ".", 
          RowBox[{"{", "nf", "}"}]}], ",", 
         RowBox[{"oneColumn", ".", 
          RowBox[{"{", "ia", "}"}]}], ",", " ", 
         RowBox[{"rHistory", "[", 
          RowBox[{"[", 
           RowBox[{
            RowBox[{"1", ";;", 
             RowBox[{"-", "2"}]}], ",", "All"}], "]"}], "]"}], ",", 
         RowBox[{
          RowBox[{"UnitStep", "[", 
           RowBox[{
            RowBox[{"rHistory", "[", 
             RowBox[{"[", 
              RowBox[{
               RowBox[{"1", ";;", 
                RowBox[{"-", "2"}]}], ",", "All"}], "]"}], "]"}], "-", 
            RowBox[{"(", 
             RowBox[{
              RowBox[{
               RowBox[{"Quantile", "[", 
                RowBox[{"#", ",", "thresR"}], "]"}], "&"}], "/@", 
              RowBox[{"rHistory", "[", 
               RowBox[{"[", 
                RowBox[{
                 RowBox[{"1", ";;", 
                  RowBox[{"-", "2"}]}], ",", "All"}], "]"}], "]"}]}], ")"}]}],
            "]"}], "//", "N"}], ",", "  ", "dRHistory"}], "}"}]}], "]"}]}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.6816599371215425`*^9, 3.681659939712936*^9}, {
   3.681660272926505*^9, 3.681660330243012*^9}, {3.6816603763668213`*^9, 
   3.6816604289058876`*^9}, {3.681660495230853*^9, 3.6816606340387363`*^9}, {
   3.681660760916103*^9, 3.681660764524824*^9}, {3.6816608304902234`*^9, 
   3.681660844496275*^9}, {3.681661569475322*^9, 3.6816615880250688`*^9}, 
   3.681664771822742*^9, {3.6816695368666697`*^9, 3.6816695404540334`*^9}, 
   3.6816724971801853`*^9, {3.681672565817362*^9, 3.6816725995228434`*^9}, 
   3.681672637410781*^9, {3.6817416728783236`*^9, 3.6817417046937084`*^9}, {
   3.681920414708417*^9, 3.681920425149207*^9}, {3.681925694326247*^9, 
   3.681925699623709*^9}, {3.681949986410015*^9, 3.681949993814478*^9}, {
   3.6819500714192996`*^9, 3.6819500722839622`*^9}, {3.6819523900660458`*^9, 
   3.681952403152655*^9}, {3.6852188505037117`*^9, 3.6852188964397492`*^9}, {
   3.685218933280589*^9, 3.685218975589205*^9}, {3.6852191101972556`*^9, 
   3.685219111717112*^9}, {3.685219277431546*^9, 3.6852193356551733`*^9}, {
   3.687045077140772*^9, 3.6870450771467743`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Functions to Run Simulations", "Section",
 CellChangeTimes->{{3.6819528966377273`*^9, 3.6819528980102453`*^9}, {
  3.6978959341820536`*^9, 3.6978959393450584`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"OneSim", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "numNeighborhoods_", ",", " ", "numPeriods_", ",", "numPeriodsUsed_"}], 
     "}"}], ",", 
    RowBox[{"{", " ", 
     RowBox[{"probNf_", ",", " ", "probIaNf_", ",", "reSD_"}], "}"}], ",", 
    " ", 
    RowBox[{"{", 
     RowBox[{"beta0_", ",", "beta1_", ",", "beta2_", ",", "sdShock_"}], "}"}],
     ",", "thresR_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "temp", ",", "data", ",", "y", ",", "xIa", ",", "bIa", ",", "xNf", ",", 
      "bNf", ",", "xNfTop", ",", "bNfTop", ",", "corrNfIa", ",", 
      "corrNfIaTop"}], "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"temp", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"genData", "[", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
          "numNeighborhoods", ",", " ", "numPeriods", ",", "numPeriodsUsed"}],
           "}"}], ",", 
         RowBox[{"{", " ", 
          RowBox[{"probNf", ",", " ", "probIaNf", ",", "reSD"}], "}"}], ",", 
         " ", 
         RowBox[{"{", 
          RowBox[{"beta0", ",", "beta1", ",", "beta2", ",", "sdShock"}], 
          "}"}], ",", "thresR"}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"data", "=", 
      RowBox[{"(", 
       RowBox[{
        RowBox[{
         RowBox[{"temp", "//", 
          RowBox[{
           RowBox[{"Insert", "[", 
            RowBox[{"#", ",", 
             RowBox[{"ConstantArray", "[", 
              RowBox[{"1.", ",", 
               RowBox[{
                RowBox[{"Dimensions", "[", "temp", "]"}], "[", 
                RowBox[{"[", "2", "]"}], "]"}]}], " ", "]"}], ",", "1"}], 
            "]"}], "&"}]}], "//", 
         RowBox[{
          RowBox[{"Insert", "[", 
           RowBox[{"#", ",", 
            RowBox[{
             RowBox[{"temp", "[", 
              RowBox[{"[", "3", "]"}], "]"}], "*", 
             RowBox[{"temp", "[", 
              RowBox[{"[", "6", "]"}], "]"}]}], ",", 
            RowBox[{"-", "2"}]}], "]"}], "&"}]}], "//", "Transpose"}], 
       ")"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"y", "=", 
      RowBox[{"data", "[", 
       RowBox[{"[", 
        RowBox[{"All", ",", 
         RowBox[{"-", "1"}]}], "]"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"xIa", "=", 
      RowBox[{"data", "[", 
       RowBox[{"[", 
        RowBox[{"All", ",", " ", 
         RowBox[{"{", 
          RowBox[{"1", ",", "5", ",", "6"}], "}"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"bIa", "=", 
      RowBox[{
       RowBox[{"Inverse", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "xIa", "]"}], ".", "xIa"}], "]"}], ".", 
       RowBox[{"Transpose", "[", "xIa", "]"}], ".", "y"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"xNf", "=", 
      RowBox[{"data", "[", 
       RowBox[{"[", 
        RowBox[{"All", ",", " ", 
         RowBox[{"{", 
          RowBox[{"1", ",", "4", ",", "6"}], "}"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"bNf", "=", 
      RowBox[{
       RowBox[{"Inverse", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "xNf", "]"}], ".", "xNf"}], "]"}], ".", 
       RowBox[{"Transpose", "[", "xNf", "]"}], ".", "y"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"xNfTop", "=", 
      RowBox[{"data", "[", 
       RowBox[{"[", 
        RowBox[{"All", ",", " ", 
         RowBox[{"{", 
          RowBox[{"1", ",", 
           RowBox[{"-", "2"}], ",", "6"}], "}"}]}], "]"}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"bNfTop", "=", 
      RowBox[{
       RowBox[{"Inverse", "[", 
        RowBox[{
         RowBox[{"Transpose", "[", "xNfTop", "]"}], ".", "xNfTop"}], "]"}], 
       ".", 
       RowBox[{"Transpose", "[", "xNfTop", "]"}], ".", "y"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"corrNfIa", "=", 
      RowBox[{"Correlation", "@@", 
       RowBox[{"Transpose", "[", 
        RowBox[{"data", "[", 
         RowBox[{"[", 
          RowBox[{"All", ",", 
           RowBox[{"{", 
            RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "]"}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"corrNfIaTop", "=", 
      RowBox[{"Correlation", "@@", 
       RowBox[{"Transpose", "[", 
        RowBox[{
         RowBox[{"Select", "[", 
          RowBox[{"data", ",", 
           RowBox[{
            RowBox[{
             RowBox[{"#", "[", 
              RowBox[{"[", 
               RowBox[{"-", "3"}], "]"}], "]"}], "\[Equal]", "1"}], "&"}]}], 
          "]"}], "[", 
         RowBox[{"[", 
          RowBox[{"All", ",", 
           RowBox[{"{", 
            RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "]"}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
          "numNeighborhoods", ",", " ", "numPeriods", ",", "numPeriodsUsed"}],
           "}"}], ",", 
         RowBox[{"{", " ", 
          RowBox[{"probNf", ",", " ", "probIaNf"}], "}"}], ",", " ", 
         RowBox[{"{", 
          RowBox[{"beta0", ",", "beta1", ",", "beta2", ",", "sdShock"}], 
          "}"}], ",", "thresR"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"corrNfIa", ",", "corrNfIaTop"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{"bIa", ",", "bNf", ",", "bNfTop"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"Dimensions", "[", "xIa", "]"}], "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", 
         RowBox[{
          RowBox[{"Dimensions", "[", "xNf", "]"}], "[", 
          RowBox[{"[", "1", "]"}], "]"}], ",", 
         RowBox[{
          RowBox[{"Dimensions", "[", "xNfTop", "]"}], "[", 
          RowBox[{"[", "1", "]"}], "]"}]}], "}"}]}], "}"}]}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.6819525345468516`*^9, 3.681952644424078*^9}, {
  3.681952680556484*^9, 3.6819528302675796`*^9}, {3.682024081795904*^9, 
  3.6820240938584757`*^9}, {3.6820244246687317`*^9, 3.6820245115952544`*^9}, {
  3.6820245467948384`*^9, 3.6820245470266333`*^9}, {3.6820247417741385`*^9, 
  3.68202475896459*^9}, {3.6820277643674183`*^9, 3.682027765037918*^9}, {
  3.682083855304798*^9, 3.682083891216446*^9}, {3.6823496720692434`*^9, 
  3.6823496823152685`*^9}, {3.682349863010988*^9, 3.682349904505336*^9}, {
  3.6823499785565186`*^9, 3.68234997952151*^9}, {3.685221163565221*^9, 
  3.6852211854969378`*^9}, {3.6870450771547775`*^9, 3.687045077166784*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"runSim", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{
       "numNeighborhoods_", ",", " ", "numPeriods_", ",", "numPeriodsUsed_"}],
        "}"}], ",", 
      RowBox[{"{", " ", 
       RowBox[{"probNf_", ",", " ", "probIaNf_", ",", "reSD_"}], "}"}], ",", 
      " ", 
      RowBox[{"{", 
       RowBox[{"beta0_", ",", "beta1_", ",", "beta2_", ",", "sdShock_"}], 
       "}"}], ",", "thresR_"}], "}"}], ",", "rep_"}], "]"}], ":=", 
  RowBox[{"Module", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
     "nObs", ",", "corrMeans", ",", "bMeans", ",", "corrStds", ",", "bStds", 
      ",", "simResults"}], "}"}], ",", 
    RowBox[{
     RowBox[{"simResults", "=", 
      RowBox[{"ParallelTable", "[", 
       RowBox[{
        RowBox[{"OneSim", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
           "numNeighborhoods", ",", " ", "numPeriods", ",", 
            "numPeriodsUsed"}], "}"}], ",", 
          RowBox[{"{", " ", 
           RowBox[{"probNf", ",", " ", "probIaNf", ",", "reSD"}], "}"}], ",", 
          " ", 
          RowBox[{"{", 
           RowBox[{"beta0", ",", "beta1", ",", "beta2", ",", "sdShock"}], 
           "}"}], ",", "thresR"}], "]"}], ",", 
        RowBox[{"{", "rep", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"corrMeans", "=", 
      RowBox[{
       RowBox[{"simResults", "[", 
        RowBox[{"[", 
         RowBox[{"All", ",", "2"}], "]"}], "]"}], "//", "Mean"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"bMeans", "=", 
      RowBox[{
       RowBox[{"simResults", "[", 
        RowBox[{"[", 
         RowBox[{"All", ",", "3"}], "]"}], "]"}], "//", "Mean"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"corrStds", "=", 
      RowBox[{
       RowBox[{"simResults", "[", 
        RowBox[{"[", 
         RowBox[{"All", ",", "2"}], "]"}], "]"}], "//", 
       "StandardDeviation"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"bStds", "=", 
      RowBox[{
       RowBox[{"simResults", "[", 
        RowBox[{"[", 
         RowBox[{"All", ",", "3"}], "]"}], "]"}], "//", 
       "StandardDeviation"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"nObs", "=", 
      RowBox[{
       RowBox[{"simResults", "[", 
        RowBox[{"[", 
         RowBox[{"All", ",", "4"}], "]"}], "]"}], "//", "Mean"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"{", 
      RowBox[{
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
          "numNeighborhoods", ",", " ", "numPeriods", ",", "numPeriodsUsed", 
           ",", "rep"}], "}"}], ",", 
         RowBox[{"{", " ", 
          RowBox[{"probNf", ",", " ", "probIaNf", ",", " ", "reSD"}], "}"}], 
         ",", " ", 
         RowBox[{"{", 
          RowBox[{"beta0", ",", "beta1", ",", "beta2", ",", "sdShock"}], 
          "}"}], ",", "thresR"}], "}"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"corrMeans", ",", "corrStds"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"bMeans", ",", "bStds", ",", "nObs"}], "}"}]}], "}"}]}], 
      "}"}]}]}], "\[IndentingNewLine]", "]"}]}]], "Input",
 CellChangeTimes->{{3.682085411304103*^9, 3.6820854615151052`*^9}, {
  3.682088421109909*^9, 3.6820884772226005`*^9}, {3.682088519674063*^9, 
  3.6820885203915806`*^9}, {3.682089038255271*^9, 3.6820890395431595`*^9}, {
  3.6820909253425026`*^9, 3.6820909599888597`*^9}, {3.682091027670347*^9, 
  3.6820910281026783`*^9}, {3.6820936119403596`*^9, 3.682093737790956*^9}, {
  3.6821001629603796`*^9, 3.6821003162503386`*^9}, {3.6823397269571967`*^9, 
  3.682339734477828*^9}, {3.682348866861781*^9, 3.68234887306326*^9}, {
  3.682349602032652*^9, 3.6823496161551647`*^9}, {3.682349823889063*^9, 
  3.6823498243214164`*^9}, {3.6823499187593594`*^9, 3.6823499417374773`*^9}, {
  3.682350037243643*^9, 3.682350038852454*^9}, {3.6823500730606203`*^9, 
  3.682350154370351*^9}, {3.6852211921769915`*^9, 3.6852212148125305`*^9}, {
  3.686347162712558*^9, 3.686347164073552*^9}, {3.6870450771767883`*^9, 
  3.68704507718079*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"formatSim", "[", "runSimOutput_", "]"}], ":=", 
  RowBox[{"Map", "[", 
   RowBox[{
    RowBox[{
     RowBox[{"Round", "[", 
      RowBox[{"#", ",", "0.0001"}], "]"}], "&"}], ",", 
    RowBox[{"{", 
     RowBox[{
      RowBox[{"runSimOutput", "[", 
       RowBox[{"[", 
        RowBox[{"1", ",", 
         RowBox[{"-", "1"}]}], "]"}], "]"}], ",", 
      RowBox[{"runSimOutput", "[", 
       RowBox[{"[", 
        RowBox[{"1", ",", "2", ",", "3"}], "]"}], "]"}], ",", 
      RowBox[{"Grid", "@", 
       RowBox[{"{", 
        RowBox[{"runSimOutput", "[", 
         RowBox[{"[", 
          RowBox[{"2", ",", "1", ",", "1"}], "]"}], "]"}], "}"}]}], ",", 
      RowBox[{"Grid", "@", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{
          RowBox[{"runSimOutput", "[", 
           RowBox[{"[", 
            RowBox[{"2", ",", "2", ",", "1"}], "]"}], "]"}], "[", 
          RowBox[{"[", 
           RowBox[{"All", ",", "2"}], "]"}], "]"}], ",", 
         RowBox[{
          RowBox[{"runSimOutput", "[", 
           RowBox[{"[", 
            RowBox[{"2", ",", "2", ",", "2"}], "]"}], "]"}], "[", 
          RowBox[{"[", 
           RowBox[{"All", ",", "2"}], "]"}], "]"}]}], "}"}]}]}], "}"}], ",", 
    RowBox[{"{", "2", "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.686347277319413*^9, 3.6863473008402123`*^9}, {
   3.686347336507826*^9, 3.686347402453533*^9}, 3.686347456712807*^9, 
   3.686347732811123*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Running Simulations", "Section",
 CellChangeTimes->{{3.6823560916988325`*^9, 3.6823560949699016`*^9}, {
  3.687551116213872*^9, 3.687551122109332*^9}, {3.6978959547779813`*^9, 
  3.697895957009288*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"RandomSeed", "[", "0", "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.685284866990177*^9, 3.685284871329771*^9}}],

Cell[BoxData[
 RowBox[{"With", "[", 
  RowBox[{
   RowBox[{"{", 
    RowBox[{"rep", "=", "1000"}], "}"}], ",", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"output1", "=", 
     RowBox[{"MapThread", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"runSim", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"50000", ",", "20", ",", "5"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"0.05", ",", "0.5", ",", "#1"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"0", ",", "0.1", ",", 
              RowBox[{"-", "0.1"}], ",", "0.05"}], "}"}], ",", "#2"}], "}"}], 
          ",", "rep"}], "]"}], "&"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0.01", ",", "0.02"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], "}"}]}], "]"}]}], ";", 
    "\[IndentingNewLine]", 
    RowBox[{"output2", "=", 
     RowBox[{"MapThread", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"runSim", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"50000", ",", "20", ",", "5"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"0.05", ",", "0.5", ",", "#1"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"0", ",", "0.1", ",", 
              RowBox[{"-", "0.1"}], ",", "0.05"}], "}"}], ",", "#2"}], "}"}], 
          ",", "rep"}], "]"}], "&"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{"0", ",", "0", ",", "0", ",", "0"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{"0.9", ",", "0.7", ",", "0.5", ",", "0"}], "}"}]}], "}"}]}],
       "]"}]}], ";", "\[IndentingNewLine]", 
    RowBox[{"output3", "=", 
     RowBox[{"MapThread", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"runSim", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
            RowBox[{"{", 
             RowBox[{"50000", ",", "20", ",", "5"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"0.05", ",", "0.5", ",", "#1"}], "}"}], ",", 
            RowBox[{"{", 
             RowBox[{"0", ",", "0.1", ",", 
              RowBox[{"-", "0.1"}], ",", "0.05"}], "}"}], ",", "#2"}], "}"}], 
          ",", "rep"}], "]"}], "&"}], ",", 
       RowBox[{"{", 
        RowBox[{
         RowBox[{"{", 
          RowBox[{
          "0", ",", "0.01", ",", "0.02", ",", "0", ",", "0.01", ",", "0.02", 
           ",", "0", ",", "0.01", ",", "0.02"}], "}"}], ",", 
         RowBox[{"{", 
          RowBox[{
          "0.9", ",", "0.9", ",", "0.9", ",", "0.7", ",", "0.7", ",", "0.7", 
           ",", "0.5", ",", "0.5", ",", "0.5"}], "}"}]}], "}"}]}], "]"}]}], 
    ";"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.6863413452962112`*^9, 3.686341361220005*^9}, {
   3.686341395209394*^9, 3.686341418030137*^9}, {3.686345701813695*^9, 
   3.6863457026222935`*^9}, {3.686347478368099*^9, 3.6863474811762853`*^9}, {
   3.6863477779791393`*^9, 3.6863478044278584`*^9}, {3.6863478920415096`*^9, 
   3.6863479001413155`*^9}, {3.6863480779349623`*^9, 3.686348215546982*^9}, {
   3.68634829089596*^9, 3.6863483176282625`*^9}, {3.6863483692829504`*^9, 
   3.6863484238402596`*^9}, 3.686404524355116*^9, {3.686409053260825*^9, 
   3.686409064746987*^9}, {3.686409900115374*^9, 3.6864099762544136`*^9}, {
   3.686662116721154*^9, 3.686662127908976*^9}, {3.68666269056713*^9, 
   3.68666269135149*^9}, {3.6866677435188103`*^9, 3.6866677441392665`*^9}, 
   3.6867559554019713`*^9, {3.686755995829524*^9, 3.6867559959796495`*^9}, {
   3.68701179285491*^9, 3.6870118213976912`*^9}, {3.6870120814211855`*^9, 
   3.6870120823318567`*^9}, {3.687012168745685*^9, 3.6870122035957766`*^9}, 
   3.6871056189484897`*^9, {3.6871104905911684`*^9, 3.687110497352003*^9}, {
   3.68754747220177*^9, 3.687547500988037*^9}, {3.68755106234241*^9, 
   3.6875510699506187`*^9}, 3.6978521721584363`*^9, 3.6978524584475975`*^9, {
   3.6978526273283544`*^9, 3.6978526274809065`*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Generating Tables", "Section",
 CellChangeTimes->{{3.6978959716380043`*^9, 3.6978960012846556`*^9}, {
  3.6978960623048525`*^9, 3.6978960713701496`*^9}}],

Cell[BoxData[{
 RowBox[{
  RowBox[{"incCutoff", "[", "output_", "]"}], ":=", 
  RowBox[{"output", "[", 
   RowBox[{"[", 
    RowBox[{"1", ",", 
     RowBox[{"-", "1"}]}], "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"reSD", "[", "output_", "]"}], ":=", 
  RowBox[{"output", "[", 
   RowBox[{"[", 
    RowBox[{"1", ",", "2", ",", "3"}], "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"corr", "[", "output_", "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"Round", "[", 
     RowBox[{"#", ",", "0.001"}], "]"}], "&"}], "@", 
   RowBox[{"output", "[", 
    RowBox[{"[", 
     RowBox[{"2", ",", "1", ",", "1"}], "]"}], 
    "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"corrSE", "[", "output_", "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"Round", "[", 
     RowBox[{"#", ",", "0.001"}], "]"}], "&"}], "@", 
   RowBox[{"output", "[", 
    RowBox[{"[", 
     RowBox[{"2", ",", "1", ",", "2"}], "]"}], 
    "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"beta", "[", "output_", "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"Round", "[", 
     RowBox[{"#", ",", "0.001"}], "]"}], "&"}], "@", 
   RowBox[{
    RowBox[{"output", "[", 
     RowBox[{"[", 
      RowBox[{"2", ",", "2", ",", "1"}], "]"}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "2"}], "]"}], "]"}]}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"betaSE", "[", "output_", "]"}], ":=", 
  RowBox[{
   RowBox[{
    RowBox[{"Round", "[", 
     RowBox[{"#", ",", "0.001"}], "]"}], "&"}], "@", 
   RowBox[{
    RowBox[{"output", "[", 
     RowBox[{"[", 
      RowBox[{"2", ",", "2", ",", "2"}], "]"}], "]"}], "[", 
    RowBox[{"[", 
     RowBox[{"All", ",", "2"}], "]"}], "]"}]}]}]}], "Input",
 CellChangeTimes->{
  3.687042100281149*^9, {3.6870421311492043`*^9, 3.6870421372878857`*^9}, {
   3.687042786326465*^9, 3.6870427904519906`*^9}, {3.6870953236066413`*^9, 
   3.6870953452843475`*^9}, {3.6870983188972883`*^9, 
   3.6870983224480352`*^9}, {3.68710428941224*^9, 3.687104311123251*^9}, {
   3.6871043776254272`*^9, 3.687104383711861*^9}, {3.6871051152701473`*^9, 
   3.6871051283870687`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"incCutoff", "[", "#", "]"}], ",", 
        RowBox[{
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"beta", "[", "#", "]"}], "[", 
           RowBox[{"[", "3", "]"}], "]"}], "]"}], "<>", "\"\<(\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"betaSE", "[", "#", "]"}], "[", 
           RowBox[{"[", "3", "]"}], "]"}], "]"}], "<>", "\"\<)\>\""}], ",", 
        RowBox[{
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"corr", "[", "#", "]"}], "[", 
           RowBox[{"[", "2", "]"}], "]"}], "]"}], "<>", "\"\<(\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"corrSE", "[", "#", "]"}], "[", 
           RowBox[{"[", "2", "]"}], "]"}], "]"}], "<>", "\"\<)\>\""}], ","}], 
       "}"}], "&"}], "/@", 
     RowBox[{"Reverse", "[", "output2", "]"}]}], ")"}], "//", 
   RowBox[{
    RowBox[{"Prepend", "[", 
     RowBox[{"#", ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<\!\(\*OverscriptBox[SubscriptBox[\(\[Theta]\), \(H\)], \(~\)]\)\>\
\"", ",", 
        "\"\<\!\(\*OverscriptBox[SubscriptBox[\(\[Beta]\), \(1\)], \(^\)]\)\>\
\"", ",", "\"\<\!\(\*SubscriptBox[\(\[Rho]\), \(AF\)]\)|H\>\""}], "}"}]}], 
     "]"}], "&"}]}], "//", "Grid"}]], "Input",
 CellChangeTimes->{{3.6870963790433064`*^9, 3.6870963866747108`*^9}, {
   3.6870969199364953`*^9, 3.687096971979658*^9}, {3.687097861193734*^9, 
   3.6870979558222933`*^9}, {3.68709824430017*^9, 3.687098245819172*^9}, {
   3.687098294920887*^9, 3.6870983087051315`*^9}, {3.687098342954355*^9, 
   3.6870983459923587`*^9}, {3.687098386821353*^9, 3.6870984412129855`*^9}, {
   3.6870988590008535`*^9, 3.6870988591529512`*^9}, {3.6870989158184834`*^9, 
   3.6870989275100994`*^9}, 3.687104903952051*^9, {3.6871049381976967`*^9, 
   3.6871049476641164`*^9}, {3.6871050019724045`*^9, 
   3.6871050259034595`*^9}, {3.687105069643858*^9, 3.6871050974461346`*^9}, {
   3.697851849195306*^9, 3.697851914115102*^9}, {3.697851952574088*^9, 
   3.6978519692143335`*^9}, {3.6978520006432056`*^9, 3.697852017663631*^9}}],

Cell[BoxData[
 TagBox[GridBox[{
    {"\<\"\\!\\(\\*OverscriptBox[SubscriptBox[\\(\[Theta]\\), \\(H\\)], \
\\(~\\)]\\)\"\>", "\<\"\\!\\(\\*OverscriptBox[SubscriptBox[\\(\[Beta]\\), \
\\(1\\)], \\(^\\)]\\)\"\>", "\<\"\\!\\(\\*SubscriptBox[\\(\[Rho]\\), \
\\(AF\\)]\\)|H\"\>", ""},
    {"0", "\<\"0.032(0.001)\"\>", "\<\"0.698(0.007)\"\>", ""},
    {"0.5`", "\<\"0.049(0.001)\"\>", "\<\"0.809(0.006)\"\>", ""},
    {"0.7`", "\<\"0.064(0.001)\"\>", "\<\"0.872(0.006)\"\>", ""},
    {"0.9`", "\<\"0.087(0.001)\"\>", "\<\"0.951(0.004)\"\>", ""}
   },
   AutoDelete->False,
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Grid"]], "Output",
 CellChangeTimes->{
  3.6870969431476636`*^9, {3.6870979432525177`*^9, 3.687097956689919*^9}, 
   3.68709824651969*^9, {3.687098303237214*^9, 3.6870983464947295`*^9}, {
   3.687098396905938*^9, 3.6870984418372145`*^9}, 3.6870988599495387`*^9, 
   3.6870989279406624`*^9, 3.6871049054708996`*^9, 3.687104949680863*^9, {
   3.687105002674924*^9, 3.6871050263177633`*^9}, {3.6871050985429535`*^9, 
   3.687105131240988*^9}, 3.6871091921531534`*^9, 3.6871142802025285`*^9, 
   3.687547628150304*^9, 3.6978510480836115`*^9, 3.6978517934201937`*^9, {
   3.6978518543135004`*^9, 3.697851892303832*^9}, 3.6978519699079247`*^9, 
   3.6978520186533012`*^9, 3.697852514609395*^9, 3.6978563201826844`*^9, 
   3.697946887189438*^9, 3.6980769467922883`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{"{", 
       RowBox[{
        RowBox[{"reSD", "[", "#", "]"}], ",", 
        RowBox[{
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"beta", "[", "#", "]"}], "[", 
           RowBox[{"[", "1", "]"}], "]"}], "]"}], "<>", "\"\<(\>\"", "<>", 
         RowBox[{"ToString", "[", 
          RowBox[{
           RowBox[{"betaSE", "[", "#", "]"}], "[", 
           RowBox[{"[", "1", "]"}], "]"}], "]"}], "<>", "\"\<)\>\""}]}], 
       "}"}], "&"}], "/@", "output1"}], ")"}], "//", 
   RowBox[{
    RowBox[{"Prepend", "[", 
     RowBox[{"#", ",", 
      RowBox[{"{", 
       RowBox[{
       "\"\<\!\(\*SubscriptBox[\(\[Sigma]\), \(u\)]\)\>\"", ",", 
        "\"\<\!\(\*OverscriptBox[SubscriptBox[\(\[Beta]\), \(1\)], \(^\)]\)\>\
\""}], "}"}]}], "]"}], "&"}]}], "//", "Grid"}]], "Input",
 CellChangeTimes->{{3.687095396143464*^9, 3.6870953969199195`*^9}, {
   3.6870958628181524`*^9, 3.6870959710980873`*^9}, {3.6870960041679883`*^9, 
   3.6870961025442543`*^9}, {3.6870961342846584`*^9, 
   3.6870961554215813`*^9}, {3.6870961884462233`*^9, 3.6870961921279736`*^9}, 
   3.687098910136505*^9, {3.687104240332465*^9, 3.6871042822092967`*^9}, {
   3.687104317415578*^9, 3.68710436218851*^9}, {3.6871044358818583`*^9, 
   3.6871044363281884`*^9}, {3.687104662897927*^9, 3.6871046829855237`*^9}, 
   3.6871047598573184`*^9, {3.687110416742513*^9, 3.687110417062744*^9}, 
   3.697852029454522*^9}],

Cell[BoxData[
 TagBox[GridBox[{
    {"\<\"\\!\\(\\*SubscriptBox[\\(\[Sigma]\\), \\(u\\)]\\)\"\>", "\<\"\\!\\(\
\\*OverscriptBox[SubscriptBox[\\(\[Beta]\\), \\(1\\)], \\(^\\)]\\)\"\>"},
    {"0", "\<\"0.1(0.001)\"\>"},
    {"0.01`", "\<\"0.069(0.001)\"\>"},
    {"0.02`", "\<\"0.036(0.001)\"\>"}
   },
   AutoDelete->False,
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Grid"]], "Output",
 CellChangeTimes->{
  3.687095352321955*^9, 3.687095779008526*^9, {3.687095872372014*^9, 
   3.6870958944114304`*^9}, 3.6870959441340485`*^9, 3.687095976094063*^9, {
   3.687096008682514*^9, 3.687096054857004*^9}, 3.687096105037943*^9, 
   3.6870961564372005`*^9, 3.6870961930962043`*^9, 3.6870983247776737`*^9, {
   3.687104245197977*^9, 3.6871043128165092`*^9}, {3.687104363051047*^9, 
   3.6871043853711853`*^9}, 3.687104437573098*^9, {3.687104664109284*^9, 
   3.687104683414344*^9}, 3.6871047604797935`*^9, {3.6871051182932367`*^9, 
   3.687105130008783*^9}, 3.6871091921391473`*^9, 3.687110418713654*^9, 
   3.687114280195014*^9, 3.687547628137781*^9, 3.6978510480736046`*^9, 
   3.6978520303916535`*^9, 3.6978525146274023`*^9, 3.697856320192689*^9, 
   3.6979468872154493`*^9, 3.6980769468053007`*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"listIncCutoff", "=", 
   RowBox[{"Union", "[", 
    RowBox[{"incCutoff", "/@", "output3"}], "]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"listReSD", "=", 
   RowBox[{"Union", "[", 
    RowBox[{"reSD", "/@", "output3"}], "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"betaH", "[", 
   RowBox[{"idxInc_", ",", "idxRe_"}], "]"}], ":=", 
  RowBox[{
   RowBox[{"(", 
    RowBox[{
     RowBox[{
      RowBox[{
       RowBox[{"ToString", "[", 
        RowBox[{
         RowBox[{"beta", "[", "#", "]"}], "[", 
         RowBox[{"[", "3", "]"}], "]"}], "]"}], "<>", "\"\<(\>\"", "<>", 
       RowBox[{"ToString", "[", 
        RowBox[{
         RowBox[{"betaSE", "[", "#", "]"}], "[", 
         RowBox[{"[", "3", "]"}], "]"}], "]"}], "<>", "\"\<)\>\""}], "&"}], "/@", 
     RowBox[{"Select", "[", 
      RowBox[{"output3", ",", 
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{
           RowBox[{"incCutoff", "[", "#", "]"}], "\[Equal]", 
           RowBox[{"listIncCutoff", "[", 
            RowBox[{"[", "idxInc", "]"}], "]"}]}], "&&", 
          RowBox[{
           RowBox[{"reSD", "[", "#", "]"}], "\[Equal]", 
           RowBox[{"listReSD", "[", 
            RowBox[{"[", "idxRe", "]"}], "]"}]}]}], ")"}], "&"}]}], "]"}]}], 
    ")"}], "[", 
   RowBox[{"[", "1", "]"}], "]"}]}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"Array", "[", 
     RowBox[{"betaH", ",", 
      RowBox[{"{", 
       RowBox[{"3", ",", "3"}], "}"}]}], "]"}], "//", 
    RowBox[{
     RowBox[{"MapThread", "[", 
      RowBox[{"Prepend", ",", 
       RowBox[{"{", " ", 
        RowBox[{"#", ",", "listIncCutoff"}], "}"}]}], "]"}], "&"}]}], "//", 
   RowBox[{
    RowBox[{"Prepend", "[", 
     RowBox[{"#", ",", 
      RowBox[{"Prepend", "[", 
       RowBox[{
       "listReSD", ",", 
        "\"\<\!\(\*OverscriptBox[SubscriptBox[\(\[Theta]\), \(H\)], \
\(^\)]\)\\\\\!\(\*SubscriptBox[\(\[Sigma]\), SubscriptBox[\(u\), \
\(i\)]]\)\>\""}], "]"}]}], "]"}], "&"}]}], "//", "Grid"}]}], "Input",
 CellChangeTimes->{{3.6870999610719786`*^9, 3.6870999714961348`*^9}, {
   3.687100868140644*^9, 3.687100878668162*^9}, {3.6871017670052767`*^9, 
   3.687101771448636*^9}, {3.687103817753578*^9, 3.687103826690299*^9}, 
   3.687105574991952*^9, {3.687547901126721*^9, 3.6875479014535103`*^9}}],

Cell[BoxData[
 TagBox[GridBox[{
    {"\<\"\\!\\(\\*OverscriptBox[SubscriptBox[\\(\[Theta]\\), \\(H\\)], \
\\(^\\)]\\)\\\\\\!\\(\\*SubscriptBox[\\(\[Sigma]\\), SubscriptBox[\\(u\\), \
\\(i\\)]]\\)\"\>", "0", "0.01`", "0.02`"},
    {"0.5`", "\<\"0.049(0.001)\"\>", "\<\"0.037(0.001)\"\>", \
"\<\"0.021(0.001)\"\>"},
    {"0.7`", "\<\"0.064(0.001)\"\>", "\<\"0.047(0.001)\"\>", \
"\<\"0.026(0.001)\"\>"},
    {"0.9`", "\<\"0.088(0.001)\"\>", "\<\"0.062(0.001)\"\>", \
"\<\"0.033(0.001)\"\>"}
   },
   AutoDelete->False,
   GridBoxItemSize->{"Columns" -> {{Automatic}}, "Rows" -> {{Automatic}}}],
  "Grid"]], "Output",
 CellChangeTimes->{
  3.687102054468042*^9, 3.6871020891964426`*^9, 3.687102140142067*^9, {
   3.687102170935833*^9, 3.687102238612716*^9}, 3.687102483603731*^9, 
   3.687102813240611*^9, 3.6871030274150743`*^9, 3.687105578922514*^9, 
   3.687109192163158*^9, 3.6871142802110434`*^9, 3.687547628177356*^9, 
   3.6875479163747506`*^9, 3.697851048111624*^9, 3.697852077978115*^9, 
   3.697852514647621*^9, 3.697856320204694*^9, 3.697946887237181*^9, 
   3.6980769468153105`*^9}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{1306, 1388},
WindowMargins->{{0, Automatic}, {Automatic, 0}},
Magnification:>1.7 Inherited,
FrontEndVersion->"11.0 for Microsoft Windows (64-bit) (September 21, 2016)",
StyleDefinitions->"Default.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[580, 22, 256, 3, 172, "Title"],
Cell[839, 27, 225, 4, 155, "Subtitle"],
Cell[CellGroupData[{
Cell[1089, 35, 166, 2, 119, "Section"],
Cell[1258, 39, 1726, 42, 184, "Input"],
Cell[2987, 83, 5952, 145, 613, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8976, 233, 170, 2, 119, "Section"],
Cell[9149, 237, 6498, 172, 679, "Input"],
Cell[15650, 411, 4094, 102, 448, "Input"],
Cell[19747, 515, 1451, 40, 151, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[21235, 560, 208, 3, 119, "Section"],
Cell[21446, 565, 147, 3, 51, "Input"],
Cell[21596, 570, 4069, 95, 250, "Input"]
}, Open  ]],
Cell[CellGroupData[{
Cell[25702, 670, 159, 2, 119, "Section"],
Cell[25864, 674, 2123, 62, 217, "Input"],
Cell[CellGroupData[{
Cell[28012, 740, 2219, 49, 124, "Input"],
Cell[30234, 791, 1408, 24, 163, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[31679, 820, 1501, 35, 91, "Input"],
Cell[33183, 857, 1229, 22, 135, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[34449, 884, 2370, 65, 286, "Input"],
Cell[36822, 951, 1091, 22, 138, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

